WIP Show auto-hide panels in workspaces overlay #244
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a bit awkward with how layer shell currently works, but this seems like the best way to address #29, for now. Along with a change in cosmic-panel.
In addition to showing the dock, we need to make sure the workspace overview doesn't try to draw anything over (or under) it, and that the dock receives pointer input.
cosmic-overlap-notify-unstable-v1to see where the panel is, and leave space for it.Layer::Top, but since the workspaces overview surface is created later, it ends up higher in the z-order, so without an exclusive zone the panel is non-interactive.Layer::Overvlayso it appears above the workspaces overview.Result: cosmic-workspaces reads cosmic-panel config to add padding for auto-hide panels. Cosmic-panel detects through DBus that the workspaces overview is shown, and shows the dock (without any animation). Cosmic-panel doesn't add an exclusive zone, but does move the dock to
Layer::Overlayto make sure it gets input instead of cosmic-workspaces.In the future, it would be good to to see if we can find a nicer way to handle this sort of thing, perhaps in a future ext-layer-shell protocol. But as long as this version seems to work, it seems like a better be for now than trying to come up with an extension protocol for layer shell to make this possible, or adding multiple awkward special cases to the compositor.
Unlike some alternatives, this solution will also work on other compositors without special protocols, or if we go back to drawing the background in cosmic-workspaces (probably using a subsurface) instead of a special case in the compositor. Though for now (other than with the
mock-backendfeature) cosmic-workspaces, unlike cosmic-panel, does not attempt to be compatible with any other compositor.There are a couple things that still need to be addressed, but this seems to be working generally well, unlike my earlier solutions.